home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.amiga.programmer
- Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
- From: bcerveny@athena-e.eurpd.csg.mot.com (Brian Cerveny)
- Subject: Re: Ceck out this bug. What the *** is SASC/6.56 doing?
- Organization: Motorola, Inc., Cellular Subscriber Group
- Date: 11 Mar 1996 09:30:40 -0600
- Message-ID: <v24trvir4v.fsf@athena-e.eurpd.csg.mot.com>
- In-Reply-To: patrick.hanevold@login.eunet.no's message of 10 Mar 1996 05:43:08 GMT
- X-Newsreader: Gnus v5.0.15
- References: <1120.6643T91T406@login.eunet.no>
- Sender: bcerveny@athena-e.eurpd.csg.mot.com
- Nntp-Posting-Host: 144.188.65.22
-
- In article <1120.6643T91T406@login.eunet.no> patrick.hanevold@login.eunet.no (Patrick Hanevold) writes:
-
- > Can anyone explain this? Try compiling this with a SC default SCOPTIONS
- > file, and start it from CLI. It only crashes from CLI.
- > This one was REALY fun finding. Dealyed ChunkyScreen a couple of days.
- > void main(void)
- > {
- > int x,y,n;
- > UBYTE Buffer[ScreenWidth];
- > ULONG Palette[256*3+2]; // This one causes the bug.
- >
- > struct Screen *Scr=OpenScreenTags(NULL,
- > SA_Width, 320,
- > SA_Height, 256,
- > SA_Depth, 8,
- > TAG_END);
-
- You're probably overflowing your stack. That ULONG Palette is 6144 bytes,
- and since it is a local variable it is stored on the stack.
-
- Look at your CLI stack size. If it's low (especially lower than 7000)
- then you need more. Set it to 20K and I bet you don't crash.
-
- In SAS you can set long __stack = 10000 or whatever to force the program's
- stack to be larger. Then you won't have to worry about the CLI stack.
- --
- Brian J. Cerveny, Software Engineer (bcerveny@eurpd.csg.mot.com)
- Motorola Inc., European Cellular Subscriber Division
- 600 N. US Hwy 45, Libertyville, Illinois 60048, USA
- Work phone: (847) 523-5788 FAX: (847) 523-2545
-